<%@ page language="java" import="java.util.*,com.hs.dnms.model.*,com.hs.core.utils.*,com.hs.core.cache.*" pageEncoding="utf-8"%>
<%
	String category = (String)request.getAttribute("category");
	String standardname = (String)request.getAttribute("standardname");
	String synonyms = (String)request.getAttribute("synonyms");
	PageUtil pageUtil = (PageUtil)request.getAttribute("dataList");
    String pageStr = ""; 
    int perpageCount = 1;
    int currentPage = 1;
    List dataList = null;
    if(null != pageUtil){
	   dataList = pageUtil.getPageList();
	   pageStr = pageUtil.getPageStr();
	   perpageCount = pageUtil.getNumberPerPage();
	   currentPage = pageUtil.getCurrentPage();
	} 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<%@ include file="../../include.jsp"%> 
<script src='<%=basePath%>dwr/interface/standarddwr.js'></script> 
<script language=JavaScript>
 //查询
 function searchData()
{
  	document.searchform.action="<%=basePath%>standard/standardList.do";	
	document.searchform.submit();
}
//删除题录信息
 function deleteMaga(id){
 	if(confirm("确定要删除该标准数据吗?")){
 		standarddwr.delStandard(id,callback4delete); 
 	}
 }

 function callback4delete(message){
    if("0" == message)
 	    alert("删除标准数据时出错!");  
 	else{
 	   alert("成功删除该标准数据!");
 	   document.searchform.submit();
 	} 
 }

 function exportData()
{
	document.searchform.action="<%=basePath%>standard/exportData.do";	
  	document.searchform.submit();
}

</script>
</head>
<body>
<div class="cont">
    <dl class="deta_list">
         	<form name="searchform" action="<%=basePath %>standard/standardList.do" >
			   <table width="100%" border="0" cellspacing="0" cellpadding="0" class="deta_list_sear">
			      <tr>
			        <td width="5%">
			           类别：
			          </td>
			          <td width="15%"> 
			           <input name="category" type="text" value="<%=category == null?"":category%>" class="sear_input"/>
			           </td> 
			           <td width="5%">
			           正名：
			          </td>
			          <td width="15%">
			           <input name="standardname" type="text" value="<%=standardname == null?"":standardname%>" class="sear_input"/>
			           </td>
			           <td width="5%">
			           异名：
			          </td>
			          <td width="15%">
			           <input name="synonyms" type="text" value="<%=synonyms == null?"":synonyms%>" class="sear_input"/>
			           </td>
			           <td width="10%">
			            <input name="search" type="button" value="查询"  onclick="searchData();" class="butt2"/>
			            </td>
			           <td width="10%">
			            <input name="export" type="button" value="导出全部"  onclick="exportData();" class="butt4"/> 
			        </td>
			        </tr>
			    </table>
                <table border="0" cellspacing="0" cellpadding="0" class="list">
                  <tr>
                    <th width="5%">序号</th>
                    <th width="25%">类别</th>
                    <th width="25%">正名</th>
                    <th width="20%">异名</th>  
                    <th width="15%" >备注</th>
                    <th width="10%">操作</th>
                  </tr>
                   <%if(dataList != null && dataList.size()>0){ 
			   			 for(int i =0;i<dataList.size();i++){
			     		    DnmsStandard obj = (DnmsStandard)dataList.get(i); 
 					%>
                  <tr>
                    <td align="center"><%= perpageCount*(currentPage-1)+i+1 %></td>
                    <td><%= obj.getCategory()==null?"":obj.getCategory() %></td>
                    <td><%= obj.getStandardname()==null?"":obj.getStandardname() %></td>
                    <td><%= obj.getSynonyms()==null?"":obj.getSynonyms() %></td>
                    <td><%= obj.getMemo()==null?"":obj.getMemo() %></td>
                    <td><input onclick="deleteMaga('<%=obj.getId() %>');" type="button" value="删除" class="but_2"/></td>
                  </tr>
                 
                  
         		 <%}}else{ %>
			 	<tr>
					<td colspan="7" align=center> 
			      <font color=red>没有符合条件的结果</font></td>
			     </tr>
		  		 <%} %>
                </table>
        	</form>
        	<div class="page"><%=pageStr %></div> 
    </dl>
</div>
</body>
</html>